﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using BusinessLayer.FindArtInfo.Entities;
using DBHelper;

namespace BusinessLayer.FindArtInfo
{
    public class DanhBaBL
    {
        public List<DanhBa> GetAll(int pageIndex, int pageSize)
        {
            List<DanhBa> result = new List<DanhBa>();
            var adapter = new BaseDAO(DbConfig.DbFindArtInfoConnectionString);            
            adapter.AddParameter("@PageIndex", pageIndex);
            adapter.AddParameter("@PageSize", pageSize);            
            try
            {
                result = adapter.GetList<DanhBa>("sp_test", CommandType.StoredProcedure, CustomConnectionState.CloseOnExit);                
            }
            catch (Exception)
            {
            }
            finally { adapter.Dispose(); }
            return result;
        }
    }
}
